{layout name="layout" /}
<div class="row">
    <div class="col-md-12">
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title"><i class="fa fa-user"></i> 用户</h3>
            </div>
            <form class="form-horizontal" method="post" action="_ROOT_/admin/sysuser/update/{$sysuser.id}"
                  enctype="multipart/form-data">
                <input type="hidden" name="id" value="{$sysuser.id}"/>
                <div class="box-body">
                    <div class="form-group">
                        <label for="name" class="col-sm-2 control-label">姓名：</label>
                        <div class="col-sm-9">
                            <input type="text" maxlength="20" class="form-control" name="name" id="name"
                                   placeholder="姓名" value="{$sysuser.name}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="username" class="col-sm-2 control-label">用户名：</label>
                        <div class="col-sm-9">
                            <input type="text" readonly="readonly" maxlength="20" class="form-control" name="username" id="username"
                                   placeholder="用户名" value="{$sysuser.username}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="phone" class="col-sm-2 control-label">手机号：</label>
                        <div class="col-sm-9">
                            <input type="tel" max="11" class="form-control" id='phone' name="phone" placeholder="手机号"
                                   value="{$sysuser.phone}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="email" class="col-sm-2 control-label">邮箱：</label>
                        <div class="col-sm-9">
                            <input type="tel" max="11" class="form-control" id='email' name="email" placeholder="电子邮箱"
                                   value="{$sysuser.email}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="sex">性别：</label>
                        <div class="col-sm-9">
                            <select id="sex" name="sex" class='form-control'>
                                <option value="">请选择</option>
                                <option value="0" {$sysuser.sex == '男' ? 'selected' : ''}>男</option>
                                <option value="1" {$sysuser.sex == '女' ? 'selected' : ''}>女</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="status">状态：</label>
                        <div class="col-sm-9">
                            <select id="status" name="status" class='form-control'>
                                <option value="">请选择</option>
                                <option value="1" {$sysuser.status == '启用' ? 'selected' : ''}>启用</option>
                                <option value="0" {$sysuser.status == '禁用' ? 'selected' : ''}>禁用</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">头像：</label>
                        <div class="col-sm-9">
                            <div class="upload-img">
                                <img style="max-width: 400px; max-height: 200px;" src="{$sysuser.avatar}" />
                                <input type="hidden" name="avatar" value="{$sysuser.avatar}" />
                            </div>
                            <div class='upload-thumb-wrap hdrimages' style='overflow:hidden;margin-top: 2px;'>
                                <div class='upload-thumb'>
                                    <input type='file' name="avatar"/>
                                    <a href='javascript:;'>上传</a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">备注：</label>
                        <div class="col-sm-9">
                            <textarea class="form-control" maxlength="255" name="remark" rows="5" placeholder="备注">{$sysuser.remark}</textarea>
                        </div>
                    </div>
                </div>
                <div class="box-footer" style="text-align: right">
                    <a href="javascript:history.go(-1)" type="button" class="btn btn-default">返回</a>
                    <button type="submit" class="btn btn-primary" style="margin-left: 5px;">保存</button>
                </div>
            </form>
        </div>
    </div>
</div>
